﻿package com.tudou.home.newskin.buttons
{
    import flash.display.*;
    import flash.text.*;

    public class ResolutionTip extends Sprite
    {
        private var textField:TextField;

        public function ResolutionTip()
        {
            graphics.clear();
            graphics.beginFill(0, 0.45);
            graphics.drawRoundRectComplex(0, 0, 180, 40, 10, 10, 10, 10);
            graphics.endFill();
            textField = new TextField();
            textField.borderColor = 16711680;
            textField.backgroundColor = 2566914048;
            textField.autoSize = TextFieldAutoSize.LEFT;
            textField.selectable = false;
            textField.mouseEnabled = false;
            addChild(textField);
            return;
        }// end function

        public function setResolution(param1:int, param2:int) : void
        {
            var _loc_3:* = "分辨率:" + param1 + "x" + param2;
            textField.text = _loc_3;
            var _loc_4:* = new TextFormat("宋体", 18, 16777215, true);
            var _loc_5:* = new TextFormat("arial", 18, 16777215, true);
            textField.setTextFormat(_loc_4, 0, 3);
            textField.setTextFormat(_loc_5, 3, _loc_3.length);
            textField.x = int((width - textField.width) / 2);
            textField.y = int((height - textField.height) / 2);
            return;
        }// end function

    }
}
